<template>
  <view class="content">
    <view class="main">
      <view class="box">
        <view class="predetermine">
          <view class="store df-c">
            <image src="/static/order-md.png" />
            <view>利思泰自助台球（申亚时代广场店）</view>
          </view>
          <view class="desk-no df-c">
            <image src="/static/order-tq.png" />
            <view>1号桌</view>
          </view>
          <view class="time df-c">
            <image src="/static/order-time.png" />
            <view>2023-03-19（周日）07:00-</view>
          </view>
        </view>
        <view class="total-price">
          <view class="tit"> 退款信息 </view>
          <view class="refund">
            <view>退款金额</view>
            <view class="refund-r">
              <view class="refund-num">¥96.00</view>
            </view>
          </view>
          <view class="coupon">
            <view>退回优惠券</view>
            <view class="coupon-r">
              <view class="coupon-num">原路退回</view>
            </view>
          </view>
          <view class="pay">
            <view>退还方式</view>
            <view class="pay-r">
              <view class="pay-num">1张</view>
            </view>
          </view>
        </view>
        <view class="refund-reason">
          <view class="tit">退款原因（必选）</view>
          <view class="select">
            <view class="item" v-for="item in refundList" :key="item.value">
              <view>{{item.label}}</view>
              <image v-show="refundid !== item.value" src="/static/jt-no.png" />
              <image v-show="refundid === item.value" src="/static/yhj-check.png" />
            </view>
          </view>
        </view>
      </view>
    </view>
    <view class="footer">
      <view class="btn">
        <view class="btn-l">
          <view class="tatol-price">合计：¥100.00</view>
          <view class="discount">已优惠：¥50.00</view>
        </view>
        <view class="btn-r">
          <view>微信支付</view>
          <image class="jt" src="/static/jt.png" />
        </view>
      </view>
    </view>
  </view>
</template>
<script setup>
import { ref, reactive, watch, getCurrentInstance, onMounted } from "vue";
const refundid = ref(1)
const refundList = [
  {
    label:'买多了/买错了',
    value:1,
  },
  {
    label:'计划有变，暂时不需要了',
    value:2,
  },
  {
    label:'价格不划算',
    value:3,
  },
  {
    label:'忘记使用优惠券',
    value:4,
  },
  {
    label:'门店停业/无法接待',
    value:5,
  },
  {
    label:'其他原因',
    value:6,
  },
]
</script>
<style lang='less' scoped>
.content {
  display: flex;
  flex-direction: column;
  height: 100vh;

  // padding: 24rpx;
  .df-c {
    display: flex;
    align-items: center;
  }
  .main {
    background-color: #f7f7f7;
    padding: 24rpx;
    flex: 1;
    overflow-y: auto;

    .predetermine {
      padding: 30rpx 26rpx;
      border-bottom: 2rpx solid #eeeeee;
      background-color: #fff;

      .store {
        font-size: 28rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 600;
        color: #333333;
        margin-bottom: 24rpx;
      }

      .desk-no {
        font-size: 28rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #333333;
        margin-bottom: 24rpx;
      }

      .time {
        font-size: 28rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #333333;
      }

      image {
        width: 36rpx;
        height: 36rpx;
        margin-right: 16rpx;
      }
    }

    .total-price {
      padding: 30rpx 26rpx;
      border-bottom: 2rpx solid #eeeeee;
      .tit {
        margin-bottom: 24rpx;
        font-size: 28rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 600;
        color: #333333;
      }
      .price-tit {
        font-size: 28rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #000000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10rpx;
      }

      .times {
        font-size: 26rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #666666;
        margin-bottom: 20rpx;

        .item {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-bottom: 10rpx;
        }
      }

      .coupon,
      .pay,
      .refund {
        font-size: 28rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #000000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 16rpx;

        .jt {
          width: 18rpx;
          height: 32rpx;
          margin-left: 16rpx;
        }

        .coupon-r {
          display: flex;
          align-items: center;
        }

        .coupon-num {
          color: #ff5d15;
          font-weight: 600;
        }
        .pay-num {
          font-weight: 600;
          color: #009a44;
        }
        .refund-num {
          font-weight: 600;
          color: #333333;
        }
      }
    }

    .notice {
      font-weight: 400;
      color: #666666;
      padding: 30rpx 26rpx;
      border-bottom: 2rpx solid #eeeeee;

      view {
        line-height: 48rpx;
      }

      .tit {
        font-size: 28rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 600;
        color: #000000;
        margin-bottom: 10rpx;
      }
    }
    .refund-reason{
      padding: 26rpx;
      .tit {
        font-size: 28rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 600;
        color: #000000;
        margin-bottom: 10rpx;
      }
      .select{
        .item{
          display: flex;
          align-items: center;
          justify-content: space-between;
          image{
            width: 36rpx;
            height: 36rpx;
          }
        }
      }
    }
  }

  .footer {
    padding: 34rpx 26rpx;
    box-shadow: 0rpx -12rpx 40rpx 0rpx rgba(0, 0, 0, 0.06);
    background-color: #fff;

    .btn {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      background: linear-gradient(315deg, #00b952 0%, #00e565 100%);
      border-radius: 60rpx;
      height: 120rpx;
      padding: 18rpx 42rpx;
      box-sizing: border-box;
      &::after {
        content: "";
        position: absolute;
        left: 60%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.3);
        width: 2rpx;
      }
      .btn-l {
        .tatol-price {
          font-size: 32rpx;
          font-weight: 600;
          color: #ffffff;
          line-height: 44rpx;
        }

        .discount {
          font-size: 24rpx;
          font-weight: 400;
          color: #ffffff;
        }
      }

      .btn-r {
        display: flex;
        align-items: center;
        color: #fff;
        position: relative;
        .jt {
          margin-left: 24rpx;
          width: 18rpx;
          height: 32rpx;
        }
      }
    }
  }
}
</style>